#include <iostream>
#include "QueueArray.h"
#include "QueueLink.h"
using namespace std;

/**
 * File Name       : test.h
 * Author          : 吴开杰
 * Mail            : 534098845@qq.com
 * Created Time    : 2023年02月13日  16时38分59秒
 * Desc            : 
 * 
 * 参考文章：
 * https://blog.csdn.net/a1291714103/article/details/126070680
 * 
 * 基础编程：采用泛型编程实现一个队列管理器，要求支持 uint8_t, uint16_t, uint32_t 等类型，维护空、满队列，实现数据的交换。 
 * 解题思路：
 * 1.
 * 2.
 * 3.
 * 
 * 运行环境：Ubuntu18.04
 * 编译环境：gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)
 * 编译方式：g++ main.cpp
 * 
 */
int main()
{
	QueueArray<int> que1,que2(4);
	que1.addElem(11);
	que1.addElem(12);
	que1.addElem(13);
	que1.addElem(13);
	que1.addElem(13);
	que1.printQueue();
	cout << que1.queueLen() << endl;
	que1.deleteElem();
	que1.addElem(44);
	que1.deleteElem();
	que1.addElem(32);
	que2 = que1;
	que1.printQueue();
	que2.printQueue();

	QueueArray<int> que3(que1);
	que3.printQueue();
	que1.printQueue();
	cout << que1.queueLen() << endl;
	que2 = que1;
	que2.printQueue();
	que2.deleteElem();
	que2.deleteElem();
	que2.deleteElem();
	cout << que1.front() << "," << que1.back() << endl;

	QueueLink<int> queL1,queL2;
	queL1.addElem(13);
	queL1.addElem(76);
	
	cout << queL1.front()<<" " << queL1.back() << endl;

	return 0;
}
